import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询学徒系数列表
export function listApprentice(query) {
  return request({
    url: '/sl/apprentice/list',
    method: 'get',
    params: query
  })
}

// 查询学徒系数详细
export function getApprentice(apprenticeId) {
  return request({
    url: '/sl/apprentice/' + parseStrEmpty(apprenticeId),
    method: 'get'
  })
}

// 新增学徒系数
export function addApprentice(data) {
  return request({
    url: '/sl/apprentice',
    method: 'post',
    data: data
  })
}

// 修改学徒系数
export function updateApprentice(data) {
  return request({
    url: '/sl/apprentice',
    method: 'put',
    data: data
  })
}

// 删除学徒系数
export function delApprentice(apprenticeId) {
  return request({
    url: '/sl/apprentice/' + apprenticeId,
    method: 'delete'
  })
}
